<template>
	<view class="wrapper">
		<div class="box bfff" v-for="(v,i) in list" :key="i">
			<div class="center user-box">
				<image :src="v.avatar" mode="aspectFill" class="cover mr25" @click="prevActor(i)"></image>
				<div class="flex1">
					<div class="center">
						<div class="flex1  f33">{{v.name}}</div>
						<div class="f24 c999">{{v.profession}}</div>
					</div>
					<div class="f24 c999 mt15">{{v.nameEn}}</div>
				</div>
			</div>
		</div>
		<u-empty text="暂无演职人员" v-if="list.actorlist==''" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
		</u-empty>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: {}
			};
		},
		onLoad() {
			this.list = uni.getStorageSync('actorlist')
			let that = this
			uni.setNavigationBarTitle({
				title: `演职人员`
			})
		},
		methods: {
			prevActor(i) {
				let that = this
				uni.previewImage({
					urls: that.list.actorlist.map(r => {
						return r.avatar
					}),
					current: i
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		padding: 0 20rpx;

		.cover {
			width: 110rpx;
			height: 165rpx;
			border-radius: 10rpx;
		}

		.user-box {
			padding: 30rpx 0;
			border-bottom: 1rpx solid #f0f2f4;
		}
	}
</style>